package com.esayread.data

/**
 * 书籍格式枚举
 */
enum class BookFormat {
    EPUB, PDF, MOBI
}

/**
 * 书籍数据模型
 */
data class Book(
    val id: String,
    val title: String,
    val author: String,
    val coverPath: String? = null,
    val filePath: String,
    val fileSize: Long,
    val format: BookFormat,
    val addTime: Long,
    val categories: List<String> = emptyList(),
    val description: String? = null
)

/**
 * 分类数据模型
 */
data class Category(
    val id: String,
    val name: String,
    val createTime: Long,
    val bookCount: Int = 0
)

/**
 * 阅读历史数据模型
 */
data class ReadingHistory(
    val bookId: String,
    val bookTitle: String,
    val lastReadTime: Long,
    val readingProgress: Float, // 0.0 - 1.0
    val currentChapter: String,
    val currentPosition: Int
)

/**
 * 笔记数据模型
 */
data class Note(
    val id: String,
    val bookId: String,
    val chapterTitle: String,
    val selectedText: String,
    val noteContent: String,
    val highlightColor: Int,
    val startPosition: Int,
    val endPosition: Int,
    val createTime: Long,
    val updateTime: Long
)

/**
 * 书签数据模型
 */
data class Bookmark(
    val id: String,
    val bookId: String,
    val chapterTitle: String,
    val position: Int,
    val note: String? = null,
    val createTime: Long
)